<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="application/javascript" src="../../js/angular-1.4.1/angular.js"></script>
    <script type="application/javascript" src="demo.js"></script>
</head>
<body>

<!--Reference:https://ke.qq.com/webcourse/index.html#course_id=225396&term_id=100266086&taid=1480118744871028&vid=k1419zgzoof-->


<script type="application/javascript">
    var app = angular.module("myApp", []);
    app.controller("myController1", function ($scope) {
        //这种是推断式注入
        //代码不能进行混淆
    });
    app.controller("myController2", ["$scope", function () {
        //内联式注入
        //控制器创建完成
        $scope.name = "mjduan";
        $scope.testFun = function () {
            return "Hello";
        }
    }]);
</script>
</body>
</html>